
def getNum(n,i):
    res=""
    for j in range(i):
        res+=str(n)
    return int(res)

n = int(input())
sum = 0
for i in range(1,n+1):
    sum+=getNum(n,i)
print(sum)


